#pragma once
#include <D3DX9.h>
#include <ddraw.h>
#include "defines.h"

extern LPDIRECTDRAW7			lpdd7;
extern LPDIRECTDRAWPALETTE		lpddpal;
extern LPDIRECTDRAWSURFACE7		lpddsprimary;
extern LPDIRECTDRAWSURFACE7		lpddsback;
extern LPDIRECTDRAWSURFACE7		lpddsbackground;
extern LPDIRECTDRAWCLIPPER		lpddclipper;
extern DDSURFACEDESC2			ddsd;    

class ddUtilities
{
	public:
		ddUtilities(void);
		~ddUtilities(void);
		LPDIRECTDRAWCLIPPER ddAttachClipper(LPDIRECTDRAWSURFACE7 lpdds, int numRects, LPRECT clipList);
		LPDIRECTDRAWSURFACE7 ddCreateSurface(int width, int height, int memFlags, bool colorKey = true);
		int ddFillSurface(LPDIRECTDRAWSURFACE7 lpdds, int color);
		int buildSurface(void *params = NULL, int numParms = 0);
};
